package com.hundsun.cprs.yyt.service.goods.service.impl;

import com.hundsun.cprs.yyt.common.base.BaseService;
import com.hundsun.cprs.yyt.service.goods.dao.GoodsStockLogDao;
import com.hundsun.cprs.yyt.service.goods.domain.GoodsStockLog;
import com.hundsun.cprs.yyt.service.goods.domain.query.GoodsStockLogQuery;
import com.hundsun.cprs.yyt.service.goods.dto.GoodsStockLogInfo;
import com.hundsun.cprs.yyt.service.goods.service.GoodsStockLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsStockLogServiceImpl extends BaseService implements GoodsStockLogService {

    @Autowired
    private GoodsStockLogDao goodsStockLogDao;

    @Override
    public void createStockLog(GoodsStockLog goodsStockLog) {
        goodsStockLogDao.insert(goodsStockLog);
    }

    @Override
    public void queryStockLogPage(GoodsStockLogQuery query) {
        List<GoodsStockLogInfo> goodsStockLogList = goodsStockLogDao.selectGoodsStockLogPage(query);
        query.compatible(goodsStockLogList);
    }
}
